<template>
  <section class="my-order clearfix">
    <div class="left-box">
      <left-menu :menu="list"></left-menu>
    </div>
    <div class="center-box">
      <router-view></router-view>
    </div>
    <div class="right-box">
      <side-user style="margin-bottom: 10px" :type="1" :userlist="userlist"></side-user>
      <side-list :list="sidelist" ></side-list>
    </div>
  </section>
</template>

<script>
import LeftMenu from "@/components/My/LeftMenu/"
import SideUser from "../../../components/My/UserInfo/SideUserinfo"
import SideList from "@/components/SideMenu/SideList"
export default {
  name: 'MyOrder',
  components: {
      LeftMenu,
      SideUser,
      SideList
  },
   data () {
      return {
          list: [
              {
                  id:1,
                  name: '预约管理',
                  child: [
                      {id: 21,name: '全部订单', path: '/my/myorder/orderlist',
                        child:[
                            {id: 21,name: '账户管理', path: '/my/myorder/orderlistdelist'},
                            {id: 22,name: '账户管理', path: '/my/myorder/complaint'},
                        ]
                      },
                      {id: 22,name: '待支付', path: '/my/myorder/topaid',
                          child:[
                              {id: 21,name: '账户管理', path: ''},
                              {id: 21,name: '账户管理', path: ''},
                          ]
                      },
                      {id: 23,name: '待消费', path: '/my/myorder/toconsumed',
                          child:[
                              {id: 21,name: '账户管理', path: ''},
                              {id: 21,name: '账户管理', path: ''},
                          ]
                      },
                      {id: 24,name: '待评价', path: '/my/myorder/toevaluated',
                          child:[
                              {id: 21,name: '账户管理', path: '/my/myorder/toevaluateddelist'},
                              {id: 21,name: '账户管理', path: '/my/myorder/evaluated'},
                          ]
                      },
                      {id: 25,name: '售后/退款', path: '/my/myorder/refund',
                          child:[
                              {id: 21,name: '账户管理', path: ''},
                              {id: 21,name: '账户管理', path: ''},
                          ]
                      },
                  ]
              },
              // {
              //     id:2,
              //     name: '交易管理',
              //     child: [
              //         {id: 31,name: '账户管理', path: '/my/myindex/mywallet',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 32,name: '订单管理', path: '/my/myindex/myorder',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/orderdelist'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/logistics'},
              //             ]
              //         },
              //         {id: 33,name: '售后/退款', path: '/my/myindex/aftersale',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/groundsrefundsdelist'},
              //                 {id: 12,name: '退款', path: '/my/myindex/groundsrefunds'},
              //             ]
              //         },
              //         {id: 34,name: '评价管理', path: '/my/myindex/management',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/managedelists'},
              //                 {id: 12,name: '立即评价', path: '/my/myindex/immediate'},
              //             ]
              //         },
              //         {id: 35,name: '收藏管理', path: '/my/myindex/collection',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 36,name: '我的足迹', path: '/my/myindex/footprint',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 37,name: '购物车', path: '/my/myindex/shoppingcart',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //     ]
              // },
              // {
              //     id:3,
              //     name: '综合管理',
              //     child: [
              //         {id: 31,name: '积分管理', path: '/my/myindex/pointlist',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 32,name: '等级管理', path: '/my/myindex/level',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 33,name: '我的优惠券', path: '/my/myindex/mycoupon',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 34,name: '任务管理', path: '/my/myindex/',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 35,name: '问答管理', path: '/my/myindex/question',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 36,name: '反馈中心', path: '/my/myindex/feedbackcenter',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 37,name: '服务中心', path: '/my/myindex/servicecentre',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         },
              //         {id: 38,name: '操作教程', path: '/my/myindex/operationtutorials',
              //             child:[
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //                 {id: 11,name: '系统通知', path: '/my/myindex/'},
              //             ]
              //         }
              //     ]
              // }
          ],
          sidelist: [
              {
                  id: 1,
                  name: '竞价排名',
                  child: [
                    {id: 1,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'},
                    {id: 2,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'},
                    {id: 3,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'},
                    {id: 4,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'}
                  ]
              },
              {
                  id: 2,
                  name: '大家正在预约',
                  child: [
                      {id: 21,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'},
                      {id: 22,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'},
                      {id: 23,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'},
                      {id: 24,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'}
                  ]
              },
              {
                  id: 3,
                  name: '新品推荐',
                  child: [
                      {id: 31,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'},
                      {id: 32,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'},
                      {id: 33,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'},
                      {id: 34,title: '【每月限5个名额】高效便捷，量齿定制，改变脸型，功能与美学矫正二...',price: 7800, hot: 20, num: 10, discount: 7.5,img: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1245094042,1192779942&fm=26&gp=0.jpg'}
                  ]
              },
          ],
          userlist:[]
      }
   },
    created () {
      this.init()
    },
    methods: {
        init () {
            let  _this = this
            _this.$post('/api/user/getAllUserInfo',
                {
                    token:_this.$token,
                },function (res) {
                    console.log(res.data)
                    _this.userlist = res.data
                },function (err,errmsg,errcode) {
                    _this.$message.error(errmsg);

                }
            )
        },
    }
}
</script>

<style lang="less" scoped>
  @import "../../../style/style.less";
  .my-order {
    padding: 30px 0;
    .left-box {
      width: 180px;
      border: 1px solid @border-color;
      background-color: #fafafa;
      float: left;
      margin-right: 15px;
    }
    .center-box {
      float: left;
      width: 710px;
      background-color: #fff;
      min-height: 100px;
    }
    .right-box {
      float: right;
      width: 260px;
    }
  }
</style>
